﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FaultBackService.DAL
{
    class TenMeanFarmData
    {
        /// <summary>
        /// 向十分钟数据风场平均数中添加一条记录，返回标识数
        /// </summary>
        /// <param name="lastTenMeanTime"></param>
        /// <param name="gboxMean"></param>
        /// <param name="gboxCount"></param>
        /// <param name="genMean"></param>
        /// <param name="genCount"></param>
        /// <returns></returns>
        internal int Add(Models.TenMeanFarmData data)
        {
            //构造对象
            using (Models.TurbineFaultContext context = new Models.TurbineFaultContext())
            {
                context.TenMeanFarmData.Add(data);
                context.SaveChanges();
                return data.TenMeanFarmDataId;
            }
        }
    }
}
